import { getEditorProps, getGridEditorCommonProps } from './common';

/**
 * 获取文本框的props
 *
 * @export
 * @template C
 * @return {*} 
 */
export function getInputProps<C>() {
  return { ...getEditorProps<C>(), value: [String, Number] };
}

/**
 * 获取表格文本框的props
 *
 * @export
 * @template C
 * @return {*} 
 */
export function getGridInputProps<C>() {
  return { ...getInputProps<C>(), ...getGridEditorCommonProps() };
}

/**
 * 获取数值框的props
 *
 * @export
 * @template C
 * @return {*} 
 */
export function getInputNumberProps<C>() {
  return { ...getEditorProps<C>(), value: Number };
}

/**
 * 获取表格数值框的props
 *
 * @export
 * @template C
 * @return {*} 
 */
export function getGridInputNumberProps<C>() {
  return { ...getInputNumberProps<C>(), ...getGridEditorCommonProps() };
}

/**
 * 获取ip框的props
 *
 * @export
 * @template C
 * @return {*} 
 */
export function getInputIpProps<C>() {
  return { ...getEditorProps<C>(), value: String };
}

/**
 * 获取表格ip框的props
 *
 * @export
 * @template C
 * @return {*} 
 */
export function getGridInputIpProps<C>() {
  return { ...getInputIpProps<C>(), ...getGridEditorCommonProps() };
}
